﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CommonUtils;

namespace LiveCPEProject.login
{
	public partial class Subscribe : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
            LoginStatus lgs = (LoginStatus)Master.FindControl("LoginStatus1");
            lgs.Visible = false;
            TextBox tb = (TextBox)Master.FindControl("TextBoxSearch");
            tb.Visible = false;
            Button bt = (Button)Master.FindControl("ButtonSearch");
            bt.Visible = false;
		}

        protected void ContinueSubscribtion(object sender, EventArgs e)
        {
            initUserPersonnalFields();
            Response.Redirect("~/profile/ProfileEdition.aspx?new=true");
        }

        private void initUserPersonnalFields()
        {
            Image img = ControlFinder.FindControl<Image>(Master, "UserFace");
            if (img != null)
            {
                img.ImageUrl = "~/img/sarah_conor.png";
            }

            Label lbl = ControlFinder.FindControl<Label>(Master, "LoggedUserName");
            if (lbl != null)
            {
                lbl.Text = Context.User.Identity.Name;
            }
        }
	}
}